package prototype.shallow;

import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author Feng
 * @date 2019/3/11 22:41
 */
@Getter
@Setter
public class ConcretePrototype implements Prototype {

    private int age;

    private String name;

    private List<String> hobbies;

    @Override
    public ConcretePrototype clone() {
        ConcretePrototype concretePrototype = new ConcretePrototype();
        concretePrototype.setAge(this.age);
        concretePrototype.setHobbies(this.hobbies);
        concretePrototype.setName(this.name);
        return concretePrototype;
    }
}
